Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #76

Merged
merged 1 commit into from
Oct 4, 2022
Merged

Version Packages #76

merged 1 commit into from
Oct 4, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 28, 2022

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@just-web/[email protected]

Major Changes

  • 8c3183e: Default export is removed. Use import { createApp } from '@just-web/app instead.
    This is done to avoid confusion,
    and may reserve default export for other things.

    The overall design is overhauled.

    Now createApp() only build in @just-web/log.
    @just-web/platform is removed and code moved to @just-web/browser and other places.
    So that it is center around logic, which each platform (browser, nodejs, etc) will provide implementation for the features.
    Instead of getting a common set of API by abstracting the platform.

    @just-web/contributions, @just-web/commands, @just-web/errors (moved to @just-web/browser) are all optional.

    You will need to add them in if you need them.

    This change keeps the core app very small and compact,
    thus making the design very flexible.

    The plugin mechanism is updated that now through the extend() method:

    import { createApp } from "@just-web/app";
    
    createApp({ name: "now-required" }).extend({
      name: "plugin-name",
      init() {
        /* required */
      },
      start() {
        /* optional */
      }
    });

    Use the definePlugin() method from @just-web/types to define the plugin creator function () => PluginModule, which will do some sophisticate type checking and inferring for you.

    The function can take params (they are typed) so that you can customize the plugin as needed.

    // original
    createApp({ /* various plugin options go here */ }).addPlugin(...)
    
    // now
    createApp({})
      .extend(pluginA(/* options */))
      .extend(pluginB(/* options */))
      .extend(pluginC(/* options */))

    Also, the plugin.init() is now synchronous. Instead of async as in activate(): Promise<...>.

    This mean loading of plugins should be handled outside, instead of inside.

    As the createApp() are slimmed down, so as @just-web/app.
    It does not re-export @just-web/log|contributions|commands|states anymore.
    You can add them as direct dependency and import them.

    The plugin dependencies are added as peerDependencies, so you will need to install them directly.
    This generally simplify the dependency management and is easier to spot any duplicate/version mismatch.

    May core package are new versioned together, similar to @storybook/addon-*.

    @just-web/format is moved into @just-web/commands and @just-web/contributions.
    i18n should be done at application level,
    and will figure out a way to do it.

Patch Changes

@just-web/[email protected]

Major Changes

  • 8c3183e: Add @just-web/types for defining plugin modules.

    It contains definePlugin() and PluginModule type,
    as well as other functions and types to help writing plugins.

    Currently, JustWebApp and JustWebTestApp still resides within @just-web/app.

    We may move them here in the future.

@just-web/[email protected]

Major Changes

  • 8c3183e: Add @just-web/preferences and @just-web/browser-preferences for managing user preference.

    @just-web/browser-preferences use localStorage for the job.
    Meaning the preference will be preserved through tabs and sessions.

    The key are prefixed with app name so that it works correctly in micro app/micro frontend scenarios.
    The same for clearAll(). It only clears those belong to the application.

Patch Changes

@just-web/[email protected]

Major Changes

  • 8c3183e: Add @just-web/os for OS specific capabilities.

    It is extracted from @just-web/platform (removed).

    Note that it is a plugin and add the feature to the app itself,
    along with exposing the functionalities as named exports.

    This is because the having and use them through app allows mocks to be injected deep in the system,
    very useful when rendering OS dependent UI in storybook.

Patch Changes

@just-web/[email protected]

Major Changes

  • 8c3183e: Add @just-web/preferences and @just-web/browser-preferences for managing user preference.

    @just-web/browser-preferences use localStorage for the job.
    Meaning the preference will be preserved through tabs and sessions.

    The key are prefixed with app name so that it works correctly in micro app/micro frontend scenarios.
    The same for clearAll(). It only clears those belong to the application.

Patch Changes

@just-web/[email protected]

Patch Changes

@just-web/[email protected]

Patch Changes

  • 564addf: Upgrade type-plus to 4.13.1

    Update init() and start() logs.

    Code comments are not kept so it that JSDocs will be available

  • c228a89: Upgrade standard-log to 10.0.0

  • Updated dependencies [8c3183e]

@just-web/[email protected]

Patch Changes

@just-web/[email protected]

Patch Changes

  • 564addf: Upgrade type-plus to 4.13.1

    Update init() and start() logs.

    Code comments are not kept so it that JSDocs will be available

  • Updated dependencies [564addf]

  • Updated dependencies [c228a89]

@just-web/[email protected]

Patch Changes

@just-web/[email protected]

Patch Changes

@just-web/[email protected]

Patch Changes

  • b262ab5: Commands can be added irrespective of contributions.

    This means contributions are now public contributions,
    and we can register commands that are internal to the application.

    This is the same model as VS Code.

    Originally I want all commands to be public,
    so that we can access every command everywhere.

    But there are use cases that commands can be used within a subsection of an application.
    For example, some UI internal commands for interactions.

    In those cases, it doesn't make sense to make those command public.

    invoke() now returns the value returned from the handler.
    It is not typed at the moment.

    Will need to revisit it to figure out how to type the command's return type.

    May need to create a replacement of the JustEvent from @unional/events-plus.

  • 564addf: Upgrade type-plus to 4.13.1

    Update init() and start() logs.

    Code comments are not kept so it that JSDocs will be available

  • Updated dependencies [564addf]

  • Updated dependencies [c228a89]

  • Updated dependencies [8c3183e]

@just-web/[email protected]

Patch Changes

@just-web/[email protected]

Patch Changes

@just-web/[email protected]

Patch Changes

@just-web/[email protected]

Patch Changes

  • 564addf: Upgrade type-plus to 4.13.1

    Update init() and start() logs.

    Code comments are not kept so it that JSDocs will be available

  • 0e94b19: Upgrade assertron to 10.0.0

  • Updated dependencies [564addf]

  • Updated dependencies [c228a89]

@just-func/[email protected]

Patch Changes

@github-actions github-actions bot force-pushed the changeset-release/main branch 4 times, most recently from f1d8dc0 to 953b232 Compare October 4, 2022 03:05
@github-actions github-actions bot force-pushed the changeset-release/main branch from 953b232 to 726dd00 Compare October 4, 2022 03:08
@unional unional merged commit 7e201bd into main Oct 4, 2022
@unional unional deleted the changeset-release/main branch October 4, 2022 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant